﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace 测试连表查询与分解查询.Migrations
{
    public partial class inti : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Level1_Models",
                columns: table => new
                {
                    Guid1 = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Level1_Models", x => x.Guid1);
                });

            migrationBuilder.CreateTable(
                name: "Level2_Models",
                columns: table => new
                {
                    Guid2 = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Guid1 = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Level2_Models", x => x.Guid2);
                });

            migrationBuilder.CreateTable(
                name: "Level3_Models",
                columns: table => new
                {
                    Guid3 = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Guid1 = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Guid2 = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Level3_Models", x => x.Guid3);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Level1_Models");

            migrationBuilder.DropTable(
                name: "Level2_Models");

            migrationBuilder.DropTable(
                name: "Level3_Models");
        }
    }
}
